package com.chenyongjing.design.pattern.chain.auth.builderchain;

import com.chenyongjing.design.pattern.chain.auth.Member;

/**
 * @Author chen
 * @Date 2022/11/17 21:34
 */
public class MemberService {
    public void login(String loginName,String loginPass){

        Handler.Builder builder = new Handler.Builder();
        builder.addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler());

        builder.build().doHandler(new Member(loginName,loginPass));
    }

}
